.TH std::assignable_from 3 "2024.06.10" "http://cppreference.com" "C++ Standard Libary"
.SH NAME
std::assignable_from \- std::assignable_from

.SH Synopsis
   Defined in header <concepts>
   template< class LHS, class RHS >

   concept assignable_from =
       std::is_lvalue_reference_v<LHS> &&
       std::common_reference_with<
           const std::remove_reference_t<LHS>&,                    \fI(since C++20)\fP
           const std::remove_reference_t<RHS>&> &&
       requires(LHS lhs, RHS&& rhs) {
           { lhs = std::forward<RHS>(rhs) } -> std::same_as<LHS>;

       };

   The concept assignable_from<LHS, RHS> specifies that an expression of the type and
   value category specified by RHS can be assigned to an lvalue expression whose type
   is specified by LHS.

.SH Notes

   Assignment need not be a total function. In particular, if assigning to some object
   x can cause some other object y to be modified, then x = y is likely not in the
   domain of =. This typically happens if the right operand is owned directly or
   indirectly by the left operand (e.g., with smart pointers to nodes in a node-based
   data structure, or with something like std::vector<std::any>).

.SH See also

   is_assignable
   is_trivially_assignable checks if a type has an assignment operator for a specific
   is_nothrow_assignable   argument
   \fI(C++11)\fP                 \fI(class template)\fP
   \fI(C++11)\fP
   \fI(C++11)\fP
